package com.thiny.android.app.tsms.util;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;

import com.thiny.android.app.tsms.R;

public class MessageHelper {
	// 元旦
	public static final int TYPE_NEW_YEAR = 0;
	// 春节
	public static final int TYPE_SPRING_FESTIVAL = 1;
	// 元宵
	public static final int TYPE_LANTERN_FESTIVAL = 2;
	// 情人节
	public static final int TYPE_VALENTINE_DAY = 3;
	// 中秋节
	public static final int TYPE_MOON_FESTIVAL = 4;

	public static String getMsgType(Context context, int typeId) {
		int resId = -1;
		switch (typeId) {
		case TYPE_NEW_YEAR:
			resId =R.string.new_year;
			break;
		case TYPE_SPRING_FESTIVAL:
			resId =R.string.spring_festival;
			break;
		case TYPE_LANTERN_FESTIVAL:
			resId =R.string.lantern_festival;
			break;
		case TYPE_VALENTINE_DAY:
			resId =R.string.valentine_day;
			break;
		case TYPE_MOON_FESTIVAL:
			resId =R.string.moon_festival;
			break;
		default:
			break;
		}
		return context.getApplicationContext().getString(resId);
	}
	
	public static Drawable getMsgDrawable(Context context, int typeId){
		int resId = R.drawable.default_msg_icon;
		switch (typeId) {
		case TYPE_NEW_YEAR:
			resId =R.drawable.new_year_icon;
			break;
		case TYPE_SPRING_FESTIVAL:
			resId =R.drawable.spring_festival_icon;
			break;
		case TYPE_LANTERN_FESTIVAL:
			resId =R.drawable.lantern_festival_icon;
			break;
		case TYPE_VALENTINE_DAY:
			resId =R.drawable.valentine_day_icon;
			break;
		case TYPE_MOON_FESTIVAL:
			resId =R.drawable.moon_festival_icon;
			break;
		default:
			break;
		}
		Resources resources = context.getApplicationContext().getResources();
		return resources.getDrawable(resId);
	}
	
	
	
}
